#!ipxe

# Kali Linux
# http://www.kali.org

goto ${menu} ||

:kali
set os {{ releases.kali.name }}
set os_arch ${arch}
iseq ${os_arch} x86_64 && set os_arch amd64 ||
iseq ${os_arch} i386 && set os_arch i386 ||
iseq ${os_arch} arm64 && set os_arch arm64 ||
menu ${os} - ${os_arch}
{% for item in releases.kali.versions %}
item {{ item.code_name }} ${space} ${os} {{ item.name }}
{% endfor %}
choose version || goto kali_exit

:deb_boot_type
set dir ${kali_base_dir}/dists/kali-${version}/main/installer-${os_arch}/current/images/netboot
menu ${os} boot parameters
item text ${os} text based install
choose --default ${type} type || goto kali

echo ${cls}
goto deb_${type}

:deb_text
set dir ${dir}/debian-installer/${os_arch}
goto deb_boot

:deb_boot
imgfree
kernel ${kali_mirror}/${dir}/linux vga=788 -- quiet {{ kernel_params }}
initrd ${kali_mirror}/${dir}/initrd.gz
echo
echo MD5sums:
md5sum linux initrd.gz
boot

:kali_exit
clear menu
exit 0
